Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openvino cmake config #7419

Merged
merged 39 commits into from
Sep 10, 2021

Conversation

ilya-lavrenov
Copy link
Contributor

@ilya-lavrenov ilya-lavrenov commented Sep 8, 2021

Details:

# FindOpenVINO
# ------
#
# Provides OpenVINO runtime for model creation and inference, frontend libraries
# to convert models from framework specific formats.
#
# The following components are supported:
#
#  * `Runtime`: OpenVINO C++ and C Core & Inference Runtime, frontend manager
#  * `ONNX`: OpenVINO ONNX frontend
#  * `PaddlePaddle`: OpenVINO PaddlePaddle frontend
#
# If no components are specified, `Runtime` component is provided:
#
#   find_package(OpenVINO REQUIRED) # only Runtime component
#
# If specific components are required:
#
#   find_package(OpenVINO REQUIRED COMPONENTS Runtime ONNX)
#
# Imported Targets:
# ------
#
#  Runtime targets:
#
#   `openvino::runtime`
#   The OpenVINO C++ Core & Inference Runtime
#
#   `openvino::runtime::c`
#   The OpenVINO C Inference Runtime
#
#   `openvino::core`
#   The OpenVINO C++ Core Runtime
#
#  Frontend specific targets:
#
#   `openvino::frontend::manager`
#   OpenVINO frontend manager
#
#   `openvino::frontend::onnx`
#   ONNX FrontEnd target (optional)
#
#   `openvino::frontend::paddlepaddle`
#   PaddlePaddle FrontEnd target (optional)
#
# Result variables:
# ------
#
# The module sets the following variables in your project:
#
#   `OpenVINO_FOUND`
#   System has OpenVINO Runtime installed
#
#   `OpenVINO_Runtime_FOUND`
#   OpenVINO C++ Core & Inference Runtime is available
#
#   `OpenVINO_Frontend_ONNX_FOUND`
#   OpenVINO ONNX frontend is available
#
#   `OpenVINO_Frontend_PaddlePaddle_FOUND`
#   OpenVINO PaddlePaddle frontend is available
#
#  OpenVINO version variables:
#
#   `OpenVINO_VERSION_MAJOR`
#   Major version component
# 
#   `OpenVINO_VERSION_MINOR`
#   minor version component
#
#   `OpenVINO_VERSION_PATCH`
#   Patch version component
#

Tickets:

  • TODO

@ilya-lavrenov ilya-lavrenov added this to the 2022.1 milestone Sep 8, 2021
@ilya-lavrenov ilya-lavrenov added category: build OpenVINO cmake script / infra category: inference OpenVINO Runtime library - Inference labels Sep 10, 2021
@ilya-lavrenov ilya-lavrenov marked this pull request as ready for review September 10, 2021 11:08
@ilya-lavrenov ilya-lavrenov requested a review from a team September 10, 2021 11:08
@ilya-lavrenov ilya-lavrenov requested a review from a team as a code owner September 10, 2021 11:08
@ilya-lavrenov ilya-lavrenov requested review from a team September 10, 2021 11:08
@ilya-lavrenov ilya-lavrenov requested a review from a team as a code owner September 10, 2021 11:08
@ilya-lavrenov ilya-lavrenov requested review from a team and andrew-zaytsev and removed request for a team September 10, 2021 11:08
@@ -75,7 +75,7 @@ RUN make -j $(nproc) install

# Run tests via tox
WORKDIR /openvino/runtime/bindings/python
ENV ngraph_DIR=/openvino/dist/deployment_tools/ngraph
ENV OpenVINO_DIR=/openvino/dist/deployment_tools/inference_engine/share
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a temporary change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenVINO_DIR is permanent, path will be changed in future.

@@ -111,6 +111,25 @@ _ie_find_dependency(ngraph
if(NOT TARGET inference_engine)
set(_ie_as_external_package ON)
include("${CMAKE_CURRENT_LIST_DIR}/InferenceEngineTargets.cmake")

# create targets with old names for compatibility
if(TARGET IE::runtime AND NOT TARGET IE::inference_engine)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change prefix to OV? OV::runtime

#
# The following components are supported:
#
# * `Runtime`: OpenVINO C++ and C Core & Inference Runtime, frontend manager
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a Core as a separate component?

#
# The module sets the following variables in your project:
#
# `OpenVINO_FOUND`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if user wants to use nGraph without the runtime?

@@ -39,26 +39,50 @@

if(NOT TARGET ngraph)
include("${CMAKE_CURRENT_LIST_DIR}/ngraphTargets.cmake")

# create targets with old names for compatibility
if(TARGET ngraph::core AND NOT TARGET ngraph::ngraph)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not openvino::core?

@azhogov
Copy link

azhogov commented Sep 10, 2021

@azhogov azhogov merged commit a952540 into openvinotoolkit:master Sep 10, 2021
@ilya-lavrenov ilya-lavrenov deleted the openvino-cmake-config branch September 10, 2021 12:33
akuporos pushed a commit to akuporos/openvino that referenced this pull request Sep 29, 2021
* Added OpenVINOConfig.cmake

* OpenVINOConfig.cmake part 2

* Trying to fix cmake generation

* Fixes

* Export frontends as well

* Fixed condition

* Added OpenVINO cmake package usage: docs, C samples

* Use more OpenVINO config

* Install OpenVINOConfig.cmake

* Trying to fix private plugins

* Trying to fix .tox

* Trying to fix ARM

* Fixed samples build

* Explicit ngraph duplicated targets

* Fixed fuzzing tests build

* Added IR frontend installation

* Removed install directory for IE reader

* Removed IR frontend from export list

* Reverted ngraph_DIR

* Try to fix .tox

* Fixed ieFuncTests with ONNX extensions

* Attempt #2

* Trying to fix ngraph setup.py

* Fix

* Trying to fix ONNX ngraph .tox CI

* Trying to remove spaces

* Fixed ngraph_DIR -> OpenVINO_DIR

* Removed junk files

* Try to fix ngraph wheel

* Try to fix ie_wheel

* Try to fix ngraph wheel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: build OpenVINO cmake script / infra category: inference OpenVINO Runtime library - Inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants